package io.lhj.chapter05;

import java.util.concurrent.TimeUnit;

public class EventClient1 {

    public static void main(String[] args)
    {
        new EventClient1().testNotify();
    }

    private void testWait()
    {
        try
        {
            this.wait();
        } catch (InterruptedException e)
        {
            e.printStackTrace();
        }
    }
    private void testNotify()
    {
        this.notify();
    }

    private final Object MUTEX = new Object();
    private synchronized void testWait1()
    {
        try
        {
            MUTEX.wait();
        } catch (InterruptedException e)
        {
            e.printStackTrace();
        }
    }
    private synchronized void testNotify1()
    {
        MUTEX.notify();
    }
}
